home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / prg_casm / snip9611.zip / STRINGIZ.H < prev    next >
C/C++ Source or Header  |  1996-11-24  |  535b  |  33 lines

  1. /* +++Date last modified: 02-Nov-1995 */
  2.  
  3. /*
  4. **  STRINGIZ.H - Macros to use the ANSI/ISO preprocessor "stringize" macro
  5. */
  6.  
  7. #ifndef STRINGIZ__H
  8. #define STRINGIZ__H
  9.  
  10. #define stringize(y) #y
  11. #define add_quotes(x) stringize (x)
  12.  
  13. #ifdef TEST
  14.  
  15. #include <stdio.h>
  16. #include <string.h>
  17.  
  18. #define FILENAME  MYFILE.XYZ
  19.  
  20. int main()
  21. {
  22.       char tmp[80];
  23.  
  24.       strcpy(tmp, "File: ");
  25.       strcat(tmp, add_quotes(FILENAME));
  26.       printf("%s\n", tmp);
  27.       return 0;
  28. }
  29.  
  30. #endif /* TEST */
  31.  
  32. #endif /* STRINGIZ__H */
  33.